<%@ page language="java" contentType="text/html; charset=utf-8"
	pageEncoding="utf-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>${merchantVO.uname } 商家详情</title>
<style type="text/css">
#merchant {
	font-family: "Trebuchet MS", Arial, Helvetica, sans-serif;
	width: 25%;
	border-collapse: collapse;
	table-layout: fixed;
}

td {
overflow: hidden;
}

.btn {
	display: inline-block;
	width: 60px;
	border: none 0;
	padding: 4px 0px;
	font-size: 16px;
	font-family: "Microsoft Yahei";
	background-color: rgb(30, 144, 255);
	color: white;
	cursor: pointer;
	text-align: center;
	text-decoration: none; 
    margin-left: 20px;
}

.title{
	text-align: right; 
	margin-right: 40px; 
	margin-top: 20px
 }
 
 .bar {
	background-color: #2894FF;
	width: 100%;
	height: 20px;
}
</style>
</head>
<body>
	<div class="title"><b>管理员:${manager.uname }</b></div>
	<div class="bar"></div>
	<div align="center">
		<form action="transStates?status=3&id=${merchantVO.id }&oldStatus=${merchantVO.status }" method="post">
			<table border="2" cellpadding="5" style="margin-top: 100px; text-align: right;border-style: none;" id="merchant">
			
				<tr >
					<td colspan="4" align="left" style="border: none;"><h1>商家详情：</h1></td>
				</tr>
				
				<tr>
					<td colspan="3" rowspan="2"><center><img alt="IDCart" src="image?id=${merchantVO.id }&type=idcard" 
					style="display: block;height: 150px;width:100%"></center></td>
					<td align="center" colspan="1" height="10">PORTRAIT</td>
				</tr>
				
				<tr>
					<td height="70" width="50px"><center><img alt="头像" src="image?id=${merchantVO.id }&type=portrait" 
					style="display: block;width: 100%;height: 100%"></center></td>
				</tr>
				<tr>
					<td>姓名:</td>
					<td colspan="3">${merchantVO.uname }</td>
				</tr>
				<tr>
					<td>地址:</td>
					<td colspan="3">${merchantVO.address }</td>
				</tr>
				<tr>
					<td>审核状态：</td>
					<td colspan="3">
						<c:if test="${merchantVO.status==0 }">
							未审核
						</c:if> 
						<c:if test="${merchantVO.status==3 }">
							驳回
						</c:if>
					</td>
				</tr>
				
				<c:if test="${merchantVO.status == 0}">
					<tr>
						<td valign="top"><font color="red">*${error }</font>驳回理由：</td>
						<td colspan="3"><textarea rows="5" style="height: 120px; width: 100%" name="failReason" ></textarea></td>
					</tr>
				</c:if>
				<c:if test="${merchantVO.status == 3 }">
					<tr>
						<td valign="top">驳回理由：</td>
						<td colspan="3">${merchantVO.reasonContent }</td>
					</tr>
				</c:if>

				<tr>
					<c:if test="${merchantVO.status== 0 }">
						<td colspan="4">
							<center>
								<input type="submit" value="驳回" class="btn" > 
								<a class="btn" href="transStates?status=1&id=${merchantVO.id }">通过</a>
								<a class="btn" href="getMerchantList?action=all">返回</a>
							</center>
						</td>
					</c:if>
					<c:if test="${merchantVO.status == 3 }">
							<td><a class="btn" href="getMerchantList?action=all">返回</a></td>
					</c:if>
				</tr>
			</table>
		</form>
	</div>
</body>
</html>